<?php
//header("Content-Type: text/html; charset=utf-8");
$vec["xx"]="[羞羞]";
$vec["ka"]="[可爱]";
$vec["ss"]="[色色]";
$vec["hx"]="[坏笑]";
$vec["dx"]="[大笑]";
$vec["qq"]="[亲亲]";
$vec["gz"]="[鼓掌]";
$vec["ax"]="[爱心]";
$vec["qd"]="[强大]";

function ReplaceBiaoQing($str)
{
	global $vec;
	foreach ($vec as $key=>$value)
		$str = str_replace($value, "<img src='http://www.tusijie.com/images/biaoqing/".$key.".gif' style='width:24px; height:24px; margin:0 2px;' />", $str);
		
	return $str;
}
function ShowBiaoQing($fun, $col)
{
	global $vec;
	$col++;
	$i = 0;
	$str = "";
	foreach ($vec as $key=>$value)
	{
		if (++$i % $col == 0)
			$str .= "<br />";
		$str .= "<img src='http://www.tusijie.com/images/biaoqing/".$key.".gif' onclick=\"$fun('$value')\" title=\"$value\" style=\"margin:2px;\" />";
	}
		
	return $str;
}

//echo ReplaceBiaoQing("abc[羞羞]dfjkdsjf[羞羞]kjsdf")
//echo ShowBiaoQing("test", 2);
?>
